package com.clothing.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.validator.constraints.Length;


/**
 * @ClassName: WxApp 
 * @Description: TODO(Entity) 
 * @author Charles.Tao 
 * @date 2017年9月11日 上午10:16:03 
 * @version 1.0
 */
@Entity
@Table(name = "wx_app")
public class WxApp extends BaseEntity
{
    private static final long serialVersionUID = -1300528690768266132L;

    private String accessToken;

    private Long tokenExpiresin; // 毫秒

    private String appId;

    private String appSecret;

    private String wxAccount;

    private Boolean activeFlag;

    private String token;

    /** ticket */
    private String jsapiTicket;

    /** 有效期 */
    private Long ticketExpiresin;

    /** 公众号微信菜单 */
    private String wxMenu;

    @Length(max = 512)
    @Column(name = "access_token")
    public String getAccessToken()
    {
        return accessToken;
    }

    public void setAccessToken(String accessToken)
    {
        this.accessToken = accessToken;
    }

    /**
     * 失效时间，单位：毫秒，
     * 
     * @return
     */
    @Column(name = "access_expiresin")
    public Long getTokenExpiresin()
    {
        return tokenExpiresin;
    }

    public void setTokenExpiresin(Long tokenExpiresin)
    {
        this.tokenExpiresin = tokenExpiresin;
    }

    @Length(max = 255)
    @Column(name = "app_id", nullable = false)
    public String getAppId()
    {
        return appId;
    }

    public void setAppId(String appId)
    {
        this.appId = appId;
    }

    @Length(max = 255)
    @Column(name = "app_secret", nullable = false)
    public String getAppSecret()
    {
        return appSecret;
    }

    public void setAppSecret(String appSecret)
    {
        this.appSecret = appSecret;
    }

    @Column(name = "active_flag", nullable = false)
    public Boolean getActiveFlag()
    {
        return activeFlag;
    }

    public void setActiveFlag(Boolean activeFlag)
    {
        this.activeFlag = activeFlag;
    }

    @Length(max = 255)
    @Column(name = "wx_account", nullable = false)
    public String getWxAccount()
    {
        return wxAccount;
    }

    public void setWxAccount(String wxAccount)
    {
        this.wxAccount = wxAccount;
    }

    @Length(max = 255)
    @Column(name = "token", nullable = false)
    public String getToken()
    {
        return token;
    }

    public void setToken(String token)
    {
        this.token = token;
    }

    @Length(max = 255)
    @Column(name = "jsapi_ticket")
    public String getJsapiTicket()
    {
        return jsapiTicket;
    }

    public void setJsapiTicket(String jsapiTicket)
    {
        this.jsapiTicket = jsapiTicket;
    }

    @Column(name = "ticket_expiresin")
    public Long getTicketExpiresin()
    {
        return ticketExpiresin;
    }

    public void setTicketExpiresin(Long ticketExpiresin)
    {
        this.ticketExpiresin = ticketExpiresin;
    }

    public String getWxMenu()
    {
        return wxMenu;
    }

    public void setWxMenu(String wxMenu)
    {
        this.wxMenu = wxMenu;
    }
}